import request from '@/utils/request'

export default{
    //添加课程
    addCourseInf(courseInfo){
    return request({
        url: `/eduservice/edu-course/addCourseInf`,
        method: 'post',
        data:courseInfo
    })
    },

    getCouseInfo(courseId){
        return request({
            url: `/eduservice/edu-course/getCourseInfo/${courseId}`,
            method: 'get',
            
        })
        },
        updateCourseInfo(courseInfo){
            return request({
                url: `/eduservice/edu-course/updateCourseInfo`,
                method: 'post',
                data: courseInfo 
            })
            },
            getPublish(id){
                return request({
                    url: `/eduservice/edu-course/getPublish/${id}`,
                    method: 'get',
                   
                })
                },

                //最终发布
                updateStatus(id){
                    return request({
                        url: `/eduservice/edu-course/updateStatus/${id}`,
                        method: 'post',
                    })
                },
                getAllCourse(current,limit,coursequery){
                    return request({
                        url: `/eduservice/edu-course/getAllCourse/${current}/${limit}`,
                        method: 'post',
                        data:coursequery
                    })     
                },
                deleteCourseWith(id){
                    return request({
                        url: `/eduservice/edu-course/deleteCourseWith/${id}`,
                        method: 'delete',
                    })
                }


}
